#include    <stdio.h>
#include    <windows.h>
#include    "gameapp.h"

void GLDrawTrangle(HDC hdc)
{
    static float theta = 0.0f;
    glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
    glClear(GL_COLOR_BUFFER_BIT);
    glPushMatrix();
    glRotatef(theta, 0.0f, 0.0f, 1.0f);

    glBegin(GL_TRIANGLES);

    glColor3f(1.0f, 0.0f, 0.0f);   glVertex2f(0.0f,   1.0f);
    glColor3f(0.0f, 1.0f, 0.0f);   glVertex2f(0.87f,  -0.5f);
    glColor3f(0.0f, 0.0f, 1.0f);   glVertex2f(-0.87f, -0.5f);

    glEnd();
    glPopMatrix();
    SwapBuffers(hdc);
    theta += 1.0f;
}


int UnitTest();
//Uint test Setting
bool do_unit_test = true;


int APIENTRY WinMain(HINSTANCE hinstance,HINSTANCE pre,LPSTR cmd,int cmdshow)
{

//unit test

    if(do_unit_test)
    {
        UnitTest();
        system("pause");
        return 0;
    }

//..................

    printf("ok!\n");
    return 0;
}


#include    <string>
#include    <iostream>
#include    "personal/audio/audio_engine.h"

int UnitTest()
{

    GameApp* app = new GameApp();
    app->run();
    delete app;


    printf("unit test over!\n");
    return 0;
}


